﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace FreeProperty.Data
{
    public static class FreePropertySettings
    {
        public static string ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings["dbconn"].ConnectionString;
        public static int PageSize = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["PageSize"]);
        public static int MaxEmailItemsCount = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["MaxEmailItemsCount"]);
        public static string AdminEmail = System.Configuration.ConfigurationManager.AppSettings["AdminEmail"];
        public static string SMTPUserName = System.Configuration.ConfigurationManager.AppSettings["SMTPUserName"];
        public static string SMTPUserPassword = System.Configuration.ConfigurationManager.AppSettings["SMTPUserPassword"];
        public static string SMTPServer = System.Configuration.ConfigurationManager.AppSettings["SMTPServer"];
        public static bool EnableSsl = Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["EnableSsl"]);
        public static int SMTPPort = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["Port"]);

        //public static string ConnectionString = "";
        //public static int PageSize = 10;
        //public static int MaxEmailItemsCount = 10;
        //public static string AdminEmail = "";
        //public static string SMTPUserName = "";
        //public static string SMTPUserPassword = "";
        //public static string SMTPServer = "";
        //public static bool EnableSsl = false;
        //public static int SMTPPort = 837;



      
        public static string GetDBString(string sQuery)
        {
            return sQuery.Replace("'", "''");
        }
    }
}
